package com.skyline.jfs.storage.service;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

import com.skyline.jfs.namespace.dao.JFSDirectoryDao;
import com.skyline.jfs.namespace.dao.JFSFileDao;
import com.skyline.jfs.namespace.model.JFSDirectory;
import com.skyline.jfs.storage.dao.JFSStorageDao;

public interface Commander extends Remote {

	public List<String> getJFSNodeToStore(int size) throws RemoteException;

	public void invalidJFSNode(Integer id) throws RemoteException;

	public void invalidJFSNode(String ip) throws RemoteException;

	public void consumeStorage(Integer id, Long storeConsume) throws RemoteException;

	public void consumeStorage(String ip, Long storeConsume) throws RemoteException;

	public JFSFileDao getJfsFileDao() throws RemoteException;

	public void setJfsFileDao(JFSFileDao jfsFileDao) throws RemoteException;

	public JFSDirectoryDao getJfsDirectoryDao() throws RemoteException;

	public void setJfsDirectoryDao(JFSDirectoryDao jfsDirectoryDao) throws RemoteException;
	
	//public JFSDirectory createDirectory(List<String> dirs)throws RemoteException;
	
	public long createFile(String dir,long size,int replicNum)throws RemoteException;
	
	public JFSStorageDao getJfsStorageDao() throws java.rmi.RemoteException;

	public void setJfsStorageDao(JFSStorageDao jfsStorageDao) throws java.rmi.RemoteException;
	
	public List<String> getAbsoluteFilePath(String fileName) throws java.rmi.RemoteException;

	public List<Integer> getFileStoreJFSNodeID(String fileName) throws java.rmi.RemoteException;
}
